﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Collections.Generic.IEnumerable<GabageFactory.Models.Modification_apply>>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	数据修改申请列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>数据修改申请列表</h2>
    
    <p style="margin-top:20px;margin-left:20px">
        <%= Html.ActionLink("申请修改历史数据", "Create") %>
    </p>

    <table class="tableCss" cellspacing="1" cellpadding="0" width="85%" align="center" border="0" style="margin-top:20px" > 
       <tr>
    	    <td class="highRow">申请日期</td>
    	    <td class="highRow">申请标题</td>
		    <td class="highRow" >状态</td>
		    <td class="highRow">操作</td>
	    </tr>
        <%if (Model != null){ %>
        <% foreach (var item in Model) { %>
	    <tr onmouseover="this.className='trbgmouseover'"  onmouseout="this.className='trmouseout' ">
	        <td class="row"> <%= item.date %></td>
		    <td class="row"> <%= Html.ActionLink(item.title, "Detail", new { id = item.id })%></td>
            <td class="row"> <%= (item.status == 0 ? "等待审批" : (item.status == -1 ? "已拒绝" : (item.status == 1 ? "已批准" : (item.status == 2 ? "已处理" : "")))) %></td>
		    <td class="row" align="center">
                <%if (item.status == 0){%>
                <%= Html.ActionLink("编辑", "Edit", new { id = item.id })%> |
                <%= Html.ActionLink("删除", "Delete", new { id = item.id }, new { onclick=@"return confirm('确定删除申请" + item.title + @"吗？');"})%>
                <%} %>
            </td>
        </tr>
        <%} %>
        <%} %>
    </table>
</asp:Content>
